package org.capybara.coffeehouse.fakedevice;

import org.apache.log4j.Logger;
import org.capybara.coffeehouse.device.Device;
import org.capybara.coffeehouse.device.LightDimmer;

public class FakeDimmer extends Device implements LightDimmer {

	Logger log = Logger.getLogger(FakeDimmer.class.getName());
	
	double lastBrightness = 0.0;
	
	@Override
	public void setBrightness(double level, long fadeTimeMillis) {
		lastBrightness = level;
		log.info("setting brightness to "+level+" in "+fadeTimeMillis+" milliseconds");
	}

	@Override
	public double getBrightness() {
		return lastBrightness;
	}

	public String getName() {
		return "fakedimmer";
	}

}
